using System;

namespace CSharpPro._1030;




public class Demo
{
    private int id;
    private string name;
    private int age;
    public int Id
    {
        get => id;
        set => id = value;
    }

    public string Name
    {
        get => name;
        set => name = value ?? throw new ArgumentNullException(nameof(value));
    }

    public int Age
    {
        get => age;
        set => age = value;
    }


    public void TestPrint1()
    {
        Father father = new Father();
        father.Print();
        Child child = new Child();
        child.Print();
        Console.WriteLine("---------------");
        Father f1 = new Child();
        f1.Print();
        Father f2 = new Son();
        f2.Print();
    }
}